<!DOCTYPE html>
<html lang="en">

<head>
    <{include file="header.html" }>
        <title>分配课程科目-学员管理-
            <{$user_data[ 'school_name']}>-德安信会计在线教育平台</title>
        <script>
        $(function() {


            $("#btn_save").click(function() {
                $("form").submit();
            });
        })
        </script>
</head>

<body>
    <div class="wrap">
        <!--star left-->
        <div class="column">
            <{include file="left_menu.html" }>
        </div>
        <div id="ContMianBox">
            <!--star子栏目-->
            <div class="sub-colum">
                <div class="tit"><{$left_menu_min.menu}></div>
                <ul>
                    <{foreach from=$left_menu_min.list item=item}>
                    <li <{if $item['url'] == $left_menu_min.curr}>class="curr"<{/if}>><a href="<{$item['url']}>"><{$item['name']}></a></li>
                    <{/foreach}>
                </ul>
            </div>
                <!--end子栏目-->
                <!--end left-->
                <div class="container narrow">
                    <!--star conter-->
                    <div class="cetContent">
                        <div class="tit p-lr20">
                            <a class="c-40d064" href="/student">学员管理</a><em class="p-lr10 c-CCCCCC fs12">/</em><em>分配课程科目</em>
                        </div>
                        <!--star内容区域-->
                        <div class="mainScroll">
                            <div class="mainContainer line-all">
                            <ul class="ui-nav-tab wList33">
                                <li class="js-step-1"><a href="javascript:;">1.添加学员基本信息</a></li>
                                <li class="js-step-2 active"><a href="javascript:;">2.分配课程科目</a></li>
                            </ul>
                                <div class="tabMainCont">
                                    <!--star 编辑基本信息-->
                                    <div class="tabItem step-02">
                                    <form class="layui-form" action="/student/add_subject/<{$student_id}>" method="post" class="edit_info">
                                    <{foreach from=$cate_list item=item}>


                									  <div class="layui-form-item">
                									    <label class="layui-form-label"><{$item['name']}></label>
                									    <div class="layui-input-block">
                										<{foreach from=$item['course_list'] item=ite}>
                									      <input type="checkbox" name="course[]" value="<{$ite['id']}>" title="<{$ite['title']}>">
                									      <{/foreach}>
                									      

                									    </div>
                									  </div>
                									  <{/foreach}>
                									  

                									  <div class="layui-form-item">
                									    <div class="layui-input-block">
                									      <button class="layui-btn" lay-submit="" lay-filter="demo1">保存</button>
                									      <button type="reset" class="layui-btn layui-btn-primary">重置</button>

                									    </div>
                									  </div>
                									</form>
                                    </div>
                                    <!--end 编辑基本信息-->
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--end内容区域-->
                    <!--end conter-->
                </div>
        </div>
    </div>
    <{include file="footer.html"}>
    <script>
layui.use(['form', 'layedit', 'laydate'], function(){
  var form = layui.form()
  ,layer = layui.layer
  ,laydate = layui.laydate;

  //自定义验证规则
  form.verify({
    phone: function(value){
      if(!(/^1[34578]\d{9}$/.test(value))){
        return "手机号码有误，请重填";
      }
    }

  });

    var birthday = {
      min: laydate.now(-20000)
      ,max: laydate.now()
      ,istoday: false
      ,choose: function(datas){
        birthday.min = datas; //开始日选好后，重置结束日的最小日期
        birthday.start = datas //将结束日的初始值设定为开始日
      }
    };


    document.getElementById('birthday').onclick = function(){
      birthday.elem = this;
      laydate(birthday);
    }


  //监听提交
  // form.on('submit(demo1)', function(data){
  //   // layer.alert(JSON.stringify(data.field), {
  //   //   title: '最终的提交信息'
  //   // })
  //   // parent.$('#order_submit').text('我被改变了');
  //   // parent.layer.tips('Look here', '#order_submit', {time: 5000});
  //   // parent.layer.close(index);
  //   // var name = $("#name").val();
  //   // var phone = $("#phone").val();
  //   // var birthday = $("#birthday").val();
  //   // var sex = $('input[name="sex"]:checked ').val();
  //   // var wx = $("#wx").val();
  //   // var qq = $("#qq").val();
  //   // var edu = $("#edu").val();
  //   // var on_job = $("#on_job").val();
  //   // var class_time =[];
  //   // $('input[name="class_time"]:checked').each(function(){
  //   // class_time.push($(this).val());
  //   // });
  //   // if(class_time.length==0){
  //   //   class_time = "";
  //   // }

  //   // var address = $("#address").val();
  //   // var remark = $("#remark").val();

 

  //   return true;
  // });


});
</script>
</body>

</html>
